#include "Common.h"
#include "Window_Options.h"

#include <QtGui/QGridLayout>
#include <QtGui/QSplitter>
#include <QtGui/QTreeWidget>

namespace Jonathan
{
   /**
    * @brief Initializes a new Options window.
    *
    * @param parent Parent widget.
    */
   Window_Options::Window_Options(QWidget *parent) :
       QDialog (parent)
   {
      this->resize (550, 400);
      this->setWindowTitle ("Jonathan Options");

      QSplitter* splitter = new QSplitter (this);

      this->m_StackWidget = new QStackedWidget (splitter);

      QTreeWidget* treeView = new QTreeWidget (splitter);
      treeView->setHeaderHidden (true);

      QTreeWidgetItem* item = new QTreeWidgetItem (treeView);
      item->setText (0, "Start");
      item->setIcon (0, Common::GetIcon (Jonathan::ICON_Start));
      treeView->addTopLevelItem (item);

      splitter->addWidget (treeView);
      splitter->addWidget (this->m_StackWidget);
      QGridLayout* layout = new QGridLayout (this);
      layout->setMargin (0);
      layout->setSpacing (0);
      layout->addWidget (splitter);
      this->setLayout (layout);
   }

}
